package com.wyh.utils.g3utils;

import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Workbook;

public class UpdateUtils {

    //给导出模版标红
    public static CellStyle createRedFontCellStyle(Workbook workbook) {
        Font headerFont = workbook.createFont();
        headerFont.setColor(IndexedColors.RED.getIndex());
        CellStyle style = workbook.createCellStyle();
        style.setFont(headerFont);
        return style;
    }

    // 辅助方法检查数组中是否包含某个值
    public static boolean contains(int[] array, int value) {
        for (int i : array) {
            if (i == value) {
                return true;
            }
        }
        return false;
    }


}
